<template>
  <view class="universal-detail-cont patrolInspect-detail-card">
    <view class="universal-detail-item">
      <view class="universal-detail-item-title">巡检描述：</view>
      <view class="universal-detail-item-cont">{{ detail.patrolDesc }}</view>
    </view>
    <view class="universal-detail-item w-full">
      <view class="universal-detail-item-title">巡检照片：</view>
      <view v-if="detail.imageUrl.length > 0" class="universal-detail-list">
        <image v-for="(image, index) in detail.imageUrl" :src="image.url" mode="aspectFit" @click="handleImagePreview(image.url, index)" class="universal-detail-list-image"></image>
      </view>
    </view>
    <view class="universal-detail-item w-full">
      <view class="universal-detail-item-title">巡检视频：</view>
      <view v-if="detail.videoUrl.length > 0" class="universal-detail-list">
        <video-preview v-for="(image, index) in detail.videoUrl" :src="image.url"></video-preview>
      </view>
    </view>
  </view>
</template>

<script setup>
const props = defineProps({
  detail: {}
});
</script>

<style lang="scss" scoped>
@import '@/assets/universal-detail.scss';
</style>